<template>
  <div>
    <h1>推荐</h1>
    <p>测试</p>
    <ul>
      <li class="item"></li>
      <li class="item"></li>
      <li class="item"></li>
      <li class="item"></li>
      <li class="item"></li>
      <li class="item"></li>
    </ul>
    <p id="loading"></p>
    <!-- <comp-swiper></comp-swiper> -->
  </div>
</template>
<script>
// import compSwiper from '../components/comp-swiperdemo.vue'
export default {
  name: "page2",
  data() {
    return {
      tempArr: [],
    };
  },
  mounted() {
    let io = new IntersectionObserver(()=>{
      // 实例化，默认当前观察
    });
    let viewList = document.getElementById("loading");
    io.observe(viewList);
  },
  methods: {
    loadList() {
      for(let i=0;i<k.length;i++){
        console.log(i)
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.item{
  width: 100%;
  height: 30px;
  background: #fcc;
  margin: 1000px;
}
</style>